import fetch from 'common/src/utils/fetch';
import baseUrl from './env';
function test(key) {
  return fetch({
      url: `${baseUrl}/positionApply/downPlan?ids=2`,
      method: 'get'
  });
}
// 获取当前系统时间
function getCurrentSystemTime(key) {
  return fetch({
      url: `${baseUrl}/common/getCurrentDate`,
      method: 'get'
  });
}
// 下载步骤1
function downloadGetKey(key) {
  return fetch({
      url: `${baseUrl}/export/result/${key}`,
      method: 'get'
  });
}
// 下载步骤2
function downloadGetPath(params) {
  return fetch({
      url: baseUrl + '/export/file?file=' + params.file + '&name=' + params.name,
      method: 'get'
  });
}
// 根据学院查询相关专业
function getMajorByCollage(data) {
  return fetch({
      url: baseUrl + "/common/getDegreeByCollege",
      method: 'post',
      data
  });
}
// 查找id
function  getSession () {
  return fetch({
      url: baseUrl + "/common/getSession",
      method: 'get'
  });
}
export default {
    'test': test,
    'getCurrentSystemTime': getCurrentSystemTime,
    'getSession': getSession,
    'downloadGetKey': downloadGetKey,
    'downloadGetPath': downloadGetPath,
    'getMajorByCollage': getMajorByCollage,
};

